﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace WindowsGame1
{
    class BackGround
    {
        //Variáveis
        public Texture2D textura;
        public Vector2 posicao, escala;
        public bool visible;
        public float alpha;
        public Rectangle retangulo;

        //Função Construtora
        public BackGround(Texture2D textura)
        {
            this.textura = textura;
            this.posicao = new Vector2(0, 0);
            this.visible = true;
            this.escala = new Vector2((GraphicsDeviceManager.DefaultBackBufferWidth / textura.Width) * 1.05f, (GraphicsDeviceManager.DefaultBackBufferHeight / textura.Height) * 1.08f);
            this.alpha = 1;
            this.retangulo = new Rectangle(0, 0, textura.Width, textura.Height); 
        }

        public void Update(float tamanhoDaTela)
        {
           
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            if (visible == true)
            {
                spriteBatch.Draw(textura, posicao, retangulo, Color.White, 0, posicao, escala, SpriteEffects.None, 0.5f);
            }
        }
    }
}